home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Ebooks / Thinking in C++ V2 / C25 / Fillablevector.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-25  |  558 b   |  21 lines

  1. //: C25:Fillablevector.h
  2. // From Thinking in C++, 2nd Edition
  3. // Available at http://www.BruceEckel.com
  4. // (c) Bruce Eckel 1999
  5. // Copyright notice in Copyright.txt
  6. // Adapter that makes a vector<Trash*> Fillable
  7. #ifndef FILLABLEVECTOR_H
  8. #define FILLABLEVECTOR_H
  9. #include "Trash.h"
  10. #include "Fillable.h"
  11. #include <vector>
  12.  
  13. class Fillablevector : public Fillable {
  14.   std::vector<Trash*>& v;
  15. public:
  16.   Fillablevector(std::vector<Trash*>& vv) 
  17.     : v(vv) {}
  18.   void addTrash(Trash* t) { v.push_back(t); }
  19. };
  20. #endif // FILLABLEVECTOR_H ///:~
  21.